{/* LAYOUT模板 */}
	<layout name="layout"/>
{/* LAYOUT模板 */}
{/* import Js,Css */}
	<js href="__PUBLIC__/Js/admin/listTable.js"/>
	<js href="__PUBLIC__/Js/admin/js.util.js"/>
	<css href="__PUBLIC__/Css/admin/common.css"/>
	<js href="__PUBLIC__/Js/admin/js.selectzone.js"/>
	
	<css href="__PUBLIC__/Css/jquery-ui.css" />
	<js href="__PUBLIC__/Js/core/jquery-ui.1.10.4.js" />
	<js href="__PUBLIC__/Js/core/plugins.js"/>
{/* import Js,Css */}
<!-- [position] -->
	<include file="Template:position"/>
<!-- [position] -->


<div class="main-div">
	<table width="98%">
		<tr>
			<td style="padding: 0px 20px">
				<h3>{$msg.msg_title}</h3>
				<hr size="1" />
				<div>{$msg.msg_content}</div>
				<if condition="$msg['message_img']">
				<div align="right">
					<a href="../data/feedbackimg/{$msg.message_img}" target="_bank" width="300" height="400">{$lang.view_upload_file}</a>
					<a href="user_msg.php?act=drop_file&id={$msg.msg_id}&file={$msg.message_img}">删除</a>
				</div>
				</if>
				<div align="right"  nowrap="nowrap">
					【 
					<if condition="$msg['msg_area'] eq 1">
						留言板
					<else/>
						用户中心
					</if>
					】
					<a href="mailto:{$msg.user_email}">{$msg.user_name}</a> @ {$msg.msg_time}
				</div>
			</td>
		</tr>
		<if condition="$msg['msg_area'] eq 1">
		<tr>
			<td align="center">
			<if condition="$msg['msg_status'] eq 0">
				<input type="button" onclick="location.href='user_msg.php?act=check&check=allow&id={$msg.msg_id}'" value="允许" />
			<else/>
				<input type="button" onclick="location.href='user_msg.php?act=check&check=forbid&id={$msg.msg_id}'" value="禁止" />
			</if>
			</td>
		</tr>
		</if>
	</table>
</div>

<if condition="$msg['reply_id']">
<div class="main-div">
	<table width="98%">
		<tr>
			<td style="padding: 0px 20px">
				<h3>
					{$msg.reply_name} {$lang.from} {$msg.reply_time} {$lang.reply}:
				</h3>
				<hr size="1" />
				<div>{$msg.reply_content}</div>
			</td>
		</tr>
	</table>
</div>
</if>

<if condition="$send_fail">
<ul style="padding:0; margin: 0; list-style-type:none; color: #CC0000;">
	<li style="border: 1px solid #CC0000; background: #FFFFCC; padding: 10px; margin-bottom: 5px;" >{$lang.mail_send_fail}</li>
</ul>
</if>

<div class="main-div">
	<form method="post" action="__URL__/reply_msg" name="theForm"  onsubmit="return validate()">
		<table border="0" width="98%">
			<tr>
				<td>邮箱:</td>
				<td><input name="user_email" id="user_email"  type="text" value="{$msg.reply_email}"></td>
			</tr>
			<tr>
				<td>回复的内容:</td>
				<td rowspan="2">
					<textarea name="msg_content" cols="50" rows="4" wrap="VIRTUAL" id="msg_content">{$msg.reply_content}</textarea>
				</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td></td>
				<td><input name="send_email_notice" type="checkbox" value='1'/>邮件通知</td>
			</tr>
			<if condition="$msg['reply_id']">
			<tr>
				<td>&nbsp;</td>
				<td>提示: 此条留言已有回复, 如果继续回复将更新原来回复的内容!</td>
			</tr>
			</if>
			<tr>
				<td>&nbsp;</td>
				<td>
				<input type="hidden" name="msg_id" value="{$msg.msg_id}">      
				<input type="hidden" name="parent_id" value="{$msg.reply_id}">
				<input name="Submit" value="确定" type="submit">
				<input type="reset" value="重置" >
				<if condition="$msg['reply_id']">
					<input type="submit" name="remail" value="重发邮件" >
				</if>
				</td>
			</tr>
		</table>
	</form>
</div>

<script language="JavaScript">
	document.forms['theForm'].elements['msg_content'].focus();
	/**
	 * 检查表单输入的数据
	 */
	function validate(){
		validator = new Validator("theForm");
		validator.required("msg_content",  no_reply_content);
		return validator.passed();
	}
	onload = function(){
		// 开始检查订单
		startCheckOrder();
	}
</script>